Known in the art are door locks comprising a lock case and a locking latch, which door locks can be opened and closed mechanically. Also known in the art are electrical locks, which can be controlled to open and close by means of electrical commands and electrical opening means. In prior-art arrangements electrical locks can be adapted to receive opening commands and closing commands also wirelessly, e.g. by means of Bluetooth or WLAN.
In prior-art locks, which are controlled wirelessly, the locks are able to detect the presence of a device sending a radio signal and by means of this to control the lock e.g. to open. Prior-art locks detecting devices sending radio signals detect only the presence of a device sending a radio signal in the proximity of the lock, but do not detect e.g. on which side of the lock the device sending a radio signal is located. That being the case, in prior-art solutions the lock is controlled wirelessly with devices sending a radio signal in the same way inside of the door and outside of the door, and the location of the device on the inside or outside of the door cannot be taken into account. This is a problem e.g. in situations in which a lock is opened automatically when a device sending a radio signal is in the proximity of the lock. Automatic opening can be used e.g. when a user of a device arrives at a door and in this case the lock is opened when the device arrives in the proximity of the lock. When the user has stepped inside through the door, the door can again be locked. Since prior-art locks are not able to detect anything but the presence of a device, the lock is opened automatically again if the user goes into the proximity of the lock with a device sending a radio signal on the inside of the door, e.g. in his/her home. Thus the lock is opened unnecessarily even though the user would not want to go outside through the door. In prior art solutions e.g. the automatic opening of a lock therefore functions both outside and inside of the door, although this is not actually the aim.